
public class BitwiseOP {

	public static void main(String[] args) {
		int x, y;

		x = 44; y = 2;
		System.out.println("Test AND --> " + (x & y));
		System.out.println("X = " + x);

		x = 44; y = 2;
		System.out.println("Test OR --> " + (x | y));
		System.out.println("X = " + x);

		x = 44; y = 2;
		System.out.println("Test COMPLEMENT --> " + (~x));
		System.out.println("X = " + x);

		x = 44; y = 2;
		System.out.println("Test XOR --> " + (x ^ y));
		System.out.println("X = " + x);

		x = 44; y = 2;
		System.out.println("Test Shift Right --> " + (x >> y));
		System.out.println("X = " + x);
		
		x = -44; y = 2;
		System.out.println("Test Shift Right --> " + (x >> y));
		System.out.println("X = " + x);

		x = 44; y = 2;
		System.out.println("Test Shift Left --> " + (x << y));
		System.out.println("X = " + x);

		x = -44; y = 2;
		System.out.println("Test Shift Left --> " + (x << y));
		System.out.println("X = " + x);

		x = 44; y = 2;
		System.out.println("Test Shift Right without Sign --> " + (x >>> y));
		System.out.println("X = " + x);

		x = -44; y = 2;
		System.out.println("Test Shift Right without Sign --> " + (x >>> y));
		System.out.println("X = " + x);
	}

}
